package main.com.hu.spring5.service;

import main.com.hu.spring5.dao.UserDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

// @Component(value = "userService")//value值可以省略，默认值为类名称，首字母小写
@Service
public class UserService {

    //定义Dao类型属性
    @Autowired
    private UserDao userDao;
    public void add(){
        System.out.println("service add...");
        userDao.upDate();
    }
}
